package com.bjdd.jdy.entity.result;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/5/10.
 */

public class PerformanceResult {

    /**
     * starCount : 5
     * orderCount : 1
     */

    private double starCount;
    private int orderCount;

    public static PerformanceResult objectFromData(String str) {

        return new Gson().fromJson(str, PerformanceResult.class);
    }

    public static List<PerformanceResult> arrayPerformanceResultFromData(String str) {

        Type listType = new TypeToken<ArrayList<PerformanceResult>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public double getStarCount() {
        return starCount;
    }

    public void setStarCount(double starCount) {
        this.starCount = starCount;
    }

    public int getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(int orderCount) {
        this.orderCount = orderCount;
    }
}
